<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>轮播图设置</title>
  <link rel="stylesheet" href="/assets/css/iconfont.css">
  <link rel="stylesheet" href="/assets/libs/bootstrap.min.css">
  <link rel="stylesheet" href="/assets/css/base.css">
  <link rel="stylesheet" href="/assets/css/ad-public.css">
  <link rel="stylesheet" href="/assets/css/ad-public.css">
  <style>
    .slide {
      width: auto;
      max-height: 80px;
    }
  </style>
</head>

<body>
  <!-- 侧边栏 -->
  @@include('../assets/common/admin/adminNav.html')


  <!-- 主体 -->
  <div class="main">
    <!-- 头部 -->
    @@include('../assets/common/admin/adminMainHeader.html')
    <!-- 内容区 -->
    <div class="content">
      <div class="page-title">
        <h3>图片轮播</h3>
      </div>

      <div class="row">
        <div class="col-md-4">
          <form class="addForm">
            <h4 style="margin-bottom: 10px; font-weight: 300;">添加新轮播内容</h4>
            <div class="form-group">
              <label>图片</label>
              <img class="help-block thumbnail" style="display: none">
              <input class="form-control" type="file" id="addImageInfo">
              <input type="hidden" id="image" name="image">
            </div>
            <div class="form-group">
              <label for="text">文本</label>
              <input id="text" class="form-control" name="title" type="text" placeholder="文本">
            </div>
            <div class="form-group">
              <label for="link">链接</label>
              <input id="link" class="form-control" name="link" type="text" placeholder="链接">
            </div>
            <div class="form-group">
              <button class="btn btn-primary" type="submit">添加</button>
            </div>

          </form>
        </div>
        <div class="col-md-8">
          <table class="table table-striped table-bordered table-hover">
            <thead>
              <tr>
                <th class="text-center">图片</th>
                <th>文本</th>
                <th>链接</th>
                <th class="text-center" width="100">操作</th>
              </tr>
            </thead>
            <tbody class="handle">

            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>

  <div class="modul hide">
    <div class="mosk"></div>
    <div class="content">
      <div class="item">
        <h3>确定要删除吗？</h3>
      </div>
      <div class="btn">
        <a href="javascript:;" class="delete">删除</a>
        <a href="javascript:;" class="cancel">取消</a>
      </div>
    </div>
  </div>

  @@include('../assets/common/adminBase.html')

  <!-- 轮播图模板 -->
  <script type="text/template" id="settingSlide">
    {{each result}}
    <tr>
      <td class="text-center"><img class="slide" src="{{$value.image}}"></td>
      <td>{{$value.title}}</td>
      <td>{{$value._id}}</td>
      <td class="text-center">
        <a href="javascript:;" data-id="{{$value._id}}" class="btn btn-danger btn-xs delete-btn">删除</a>
      </td>
    </tr>
    {{/each}}
  </script>

  <script src="../js/admin/slide.js"></script>
</body>

</html>